<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>DateRange (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">date.DateRange</span>
        <span>Extends</span>
        <span class="fn-name">
          Object
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Constructs a date range.
  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_date_daterange.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/closure/goog/date/daterange.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td>goog.date.DateRange</td><td></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.date.DateRange(<span><span class="arg">startDate</span>,&nbsp;<span class="arg">endDate</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">startDate</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The first date in the range.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">endDate</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The last date in the range.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_date_DateRange.html">
              goog.date.DateRange
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.prototype.getEndDate"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getEndDate<span class="args">()</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The last date in the range.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line80">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.prototype.getStartDate"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getStartDate<span class="args">()</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The first date in the range.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line72">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.prototype.iterator"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">iterator<span class="args">()</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_iter_Iterator.html">goog.iter.Iterator</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_iter_Iterator.html">goog.iter.Iterator</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            An iterator over the date range.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line88">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_date_DateRange.html">
              goog.date.DateRange
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.date.DateRange.prototype.endDate_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">endDate_</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
     </div>


     <div class="entryOverview">
       The last date in the range.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line51">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.date.DateRange.prototype.startDate_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">startDate_</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
     </div>


     <div class="entryOverview">
       The first date in the range.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line44">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Static Methods</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.allTime"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">allTime<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the range that includes all days between January 1, 1900 and
December 31, 9999.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The range that includes all days between January 1, 1900 and December 31, 9999.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line299">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.cloneOrCreate_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">cloneOrCreate_<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span></div>
      </div>


     <div class="entryOverview">
       Clones or creates new.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span></div>&nbsp;
            cloned or new.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line374">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.currentOrLastMonday_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">currentOrLastMonday_<span class="args">(<span class="arg">date</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Calculates the Monday before a date. If the input is a Monday, returns the
input. Does not modify its input.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The input date.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            If |date| is a Monday, return |date|; otherwise return the Monday before |date|.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line136">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.equals"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">equals<span class="args">(<span class="arg">a</span>,&nbsp;<span class="arg">b</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
      </div>


     <div class="entryOverview">
       Tests two goog.date.DateRange objects for equality.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">a</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">A date range.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">b</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">A date range.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>&nbsp;
            Whether |a| is the same range as |b|.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line99">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.last7Days"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">last7Days<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the range that includes the seven days that end yesterday.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The range that includes the seven days that end yesterday.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line193">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.lastBusinessWeek"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">lastBusinessWeek<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the range that starts seven days before the Monday on or before
today and ends the Friday before today.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The range that starts seven days before the Monday on or before today and ends the Friday before today.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line281">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.lastMonth"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">lastMonth<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the range that starts the first of last month and ends the last day
of last month.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The range that starts the first of last month and ends the last day of last month.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line227">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.lastWeek"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">lastWeek<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the seven-day range that ends the day before the first day of
the week (see goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK) that
contains today.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The range that starts seven days before the Monday on or before today and ends the Sunday on or before yesterday.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line265">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.offsetInDays_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">offsetInDays_<span class="args">(<span class="arg">date</span>,&nbsp;<span class="arg">offset</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Calculates a date that is a number of days after a date. Does not modify its
input.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The input date.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">offset</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">Number of days.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The date that is |offset| days after |date|.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line121">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.offsetInMonths_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">offsetInMonths_<span class="args">(<span class="arg">date</span>,&nbsp;<span class="arg">offset</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Calculates a date that is a number of months after the first day in the
month that contains its input. Does not modify its input.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">date</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The input date.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">offset</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">Number of months.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The date that is |offset| months after the first day in the month that contains |date|.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line153">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.standardDateRange"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">standardDateRange<span class="args">(<span class="arg">dateRangeKey</span>,&nbsp;<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">dateRangeKey</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">A standard date range key.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The date range that corresponds to that key.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line332">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.today"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">today<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the range from today to today.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The range that includes only today.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line180">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.date.DateRange.yesterday"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">yesterday<span class="args">(<span class="arg">opt_today</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the range from yesterday to yesterday.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_today</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The date to consider today. Defaults to today.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_date_DateRange.html">goog.date.DateRange</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The range that includes only yesterday.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line167">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.date.DateRange.MAXIMUM_DATE"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">MAXIMUM_DATE</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
     </div>


     <div class="entryOverview">
       The last possible day, as far as this class is concerned.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line66">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.date.DateRange.MINIMUM_DATE"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">MINIMUM_DATE</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_date_Date.html">goog.date.Date</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
     </div>


     <div class="entryOverview">
       The first possible day, as far as this class is concerned.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line59">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



<h2>Enumerations</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.date.DateRange.StandardDateRangeKeys"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.date.DateRange.</span><span class="entryName">StandardDateRangeKeys</span>
        : 
     </div>


     <div class="entryOverview">
       Standard date range keys. Equivalent to the enum IDs in
DateRange.java <a href="http://go/datarange.java">http://go/datarange.java</a>
     </div>

     <div class="entryDetails">
       <div class="detailsSection">
          <b>Constants:</b>
          <table class="horiz-rule">
            <tbody>
              <tr><td>
                <span class="entryName">
                  TODAY
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  LAST_MONTH
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  LAST_BUSINESS_WEEK
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  THIS_MONTH
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  ALL_TIME
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  LAST_WEEK
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  THIS_WEEK
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  LAST_7_DAYS
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
              <tr><td>
                <span class="entryName">
                  YESTERDAY
                </span>
                <div class="entryOverview">
                  <span class='nodesc'>No description.</span>
                </div>
             </td></tr>
           </tbody>
         </table>
       </div>
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_date_daterange.js.source.html#line312">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package date</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="date.DateRange"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
